home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / tarmail / tarmail < prev    next >
Text File  |  1994-08-01  |  522b  |  20 lines

  1. TAR_OPTS='B'    # change for your system as needed. 'B' is an SGIism for 'b20'.
  2.  
  3. subject='Mail from tarmail'
  4. case "$1" in
  5. "-s")    subject="$2"; shift; shift;;
  6. esac
  7.  
  8. case $# in
  9. 0|1)    echo 'usage: tarmail [-s subject] person files...'
  10.     exit 1;;
  11. esac
  12.  
  13. dest="$1";shift
  14. # note that when we use $dest below in the "mail" command, there
  15. # are no quotes, thus allowing tarmail to multiple destinations.
  16.  
  17. (echo '~:unset record' ; tar cv${TAR_OPTS}f - "$@" | compress | btoa ) \
  18.     | Mail -s "$subject" $dest
  19. echo "file(s) sent to '$dest'"
  20.